from models.base import BaseModel, db


class VideoLibrary(BaseModel):
    __tablename__ = 'video_library'
    __table_args__ = {'comment': '视频素材库表模型'}

    id = db.Column(db.BigInteger, primary_key=True, autoincrement=True)
    title = db.Column(db.String(255), nullable=False, unique=True, comment='标题')
    file_name = db.Column(db.String(255), nullable=False, comment='文件完整路径')
    temp_file_name = db.Column(db.String(255), nullable=False, comment='临时文件名')
    oss_status = db.Column(db.String(255), nullable=False, comment='上传状态')
    dy_sync_status = db.Column(db.String(255), nullable=False, comment='同步状态')
    dy_open_video_id = db.Column(db.String(255), nullable=False, comment='抖音视频 id')
    status = db.Column(db.String(255), nullable=False, comment='状态')
    remarks = db.Column(db.Text, nullable=False, comment='备注')
